package com.niit.agricstore.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.github.pagehelper.PageInfo;
import com.niit.agricstore.entity.Notice;

import java.util.List;

public interface NoticeService extends IService<Notice> {

            int createNotice(Notice notice);

            int updateNotice(int noticeId, Notice newNotice);

            int deleteNotice(int noticeId);

            int deleteNoticeAll();

            List<Notice> getAllNotices();

            Notice getNoticeById(int noticeId);

            List<Notice> getNoticesByType(int noticeType);

            Page<Notice> getNoticesByPage(int page, int pageSize);

            // void schedulePublishNotice(Notice notice, Date publishTime);

            void updateNoticeStatus(int noticeId, int status);

            PageInfo<Notice> findNoticeAllByPage(int pageNum, int pageSize);

            PageInfo<Notice> getNoticesByUid(int noticeId, int page, int pageSize);
}
